package cc.lucien;

import java.util.HashMap;
import java.util.Map;

public class Demo01 {
    public static void main(String[] args) {
        /**
         * 获取 Class 对象的三种方法：
         *  1.类名.class
         *  2.对象.getClass()
         *  3.Class.forName(类的全限定名)
         */
        Class c1 = Demo01.class;
        System.out.println(c1);

        String str = new String("123");
        Class c2 = str.getClass();
        System.out.println(c2);

        try {
            Class c3 = Class.forName("cc.lucien.Demo01");
            System.out.println(c3);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }
}
